<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="text" v-model="msg"> <br>
    {{reverseMsg(123)}}
</div>
</body>
<script src="../../js/vue.js"></script>
<script>
    const app = document.querySelector("#app")
    new Vue({
        el:app,
        data:{
            msg:"什么是快乐星球?",
            test:"test"
        },
        computed:{
            reverseMsg:function () {
                return function (flag) {
                    console.log(flag);
                    return this.msg.split("").reverse().join("")
                }
            }
        }
    })
</script>
</html>